<template>
	<view>
		<view class="li" v-for="(item,index) in more" :key="index">
			<view>{{item.title}}</view>
			<text>{{item.year}}</text>
		</view>
	</view>
</template>

<script>
	import { gethistory } from '@/api/index.js'
	export default {
		data() {
			return {
				more:[]
			}
		},
		mounted() {
			this.get_vidolist()
		},
		methods: {
			get_vidolist(){
				gethistory().then(res=>{
					if(res.data.code==200){
						console.log(res.code)
						this.more=res.data.result
						console.log(this.more)
					}
				})
			}
		}
	}
</script>

<style scoped>
	.li{
		width: 100%;
		padding: 20rpx;
		box-sizing: border-box;
		border-bottom: 1px solid #d1d1d1;
		display: flex;
		justify-content: space-between;
		align-items: center;
		background: #36849c;
		color: #fff;
	}
	
	.li view{
		width: 80%;
	}
</style>
